package cn.com.fuhuitong.main.goods.mode

import cn.com.fuhuitong.http.BaseApiService
import cn.com.fuhuitong.http.BaseResponse
import cn.com.fuhuitong.main.goods.entity.GoodsDetailsResponse
import cn.com.fuhuitong.main.goods.entity.GoodsListResponse
import cn.com.fuhuitong.main.goods.entity.GoodsSpecsResponse
import io.reactivex.Observable
import retrofit2.http.*

interface GoodsApi : BaseApiService {

    @GET("/api/goods/get_goods_list")
    fun goodsList(
        @Query("page") page: String,
        @Query("limit") limit: String,
        @Query("category_id") categoryId: String,
        @Query("search") search: String?
    ): Observable<GoodsListResponse>

    @GET("/api/goods/get_goods_detail")
    fun goodsDetails(
        @Query("goods_id") goodsId: String
    ): Observable<GoodsDetailsResponse>

    @GET("/api/goods/get_goods_specifications")
    fun goodsSpecs(
        @Query("goods_id") goodsId: String
    ): Observable<GoodsSpecsResponse>

}